//
//  BDCityInfo.h
//  BadBoy
//
//  Created by wen on 2017/2/22.
//  Copyright © 2017年 niusaibing. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>

static NSString *cityListPath = @"cityList.plist";          //保存在沙盒中的路径

typedef NS_ENUM(NSUInteger, BDCityType) {
    BDCityTypeProvice   =1,
    BDCityTypeCity,
    BDCityTypeDistrict
};

@interface BDCityInfo : NSObject

@property (nonatomic, assign) NSInteger infoID;                 //地区ID
@property (nonatomic, assign) NSInteger parent_id;          //上级id
@property (nonatomic, strong) NSString *name;               //地区名字
@property (nonatomic, assign) BDCityType type;               //类型 1-省份/直辖市 2-城市 3-区/县
@property (nonatomic, strong) NSString *first_letter;

+ (NSArray *)getCityArray;
+ (BDCityInfo *)getCityWithName:(NSString *)cityName;

+ (BDCityInfo *)getCityWithName:(NSString *)cityName type:(BDCityType)cityType;

+ (BDCityInfo *)getCityWithId:(NSInteger)cityId;
+ (NSArray *)getCityArrayWithParentId:(NSInteger)parentId;
+ (NSArray *)getCityArrayWithType:(BDCityType)cityType;

@end
